﻿using System;
using MUnit;

namespace MUnitTests
{
    class TestSetupAndTearDown
    {
        private static int i = 0;

        [Setup]
        void Setup()
        {
            TestSetupAndTearDown.i += 5;
        }

        [Test]
        void SetupShouldWork()
        {
            Verify.Equals(5, TestSetupAndTearDown.i);
        }

        [Test]
        void TearDownShouldWork()
        {
            Verify.Equals(5, TestSetupAndTearDown.i);
        }

        [TearDown]
        void TearDown()
        {
            TestSetupAndTearDown.i -= 5;
        }
    }
}
